#include"test.h"
#define num 101
#define style '#'

void deplay(double total,double now)
{
	char arr[num];
	memset(arr,0,sizeof(arr));
	const char *lable="|/-\\";
	int len =strlen(lable);
	static int cnt =0;
	int ann=(int)(now*100/total);
	int i;
	for(i=0;i<=ann;i++)
	{
		arr[i] = style;
	}
	double rate = now/total;
	cnt %= len;
	printf("[%-100s][%.1f%%][%c]\r",arr,rate*100,lable[cnt]);
	cnt++;
	fflush(stdout);
}

	
